//
//  BCLabguageSettingManager.h
//  GSBlockChain
//
//  Created by guoshikeji_a on 2018/11/14.
//  Copyright © 2018年 guoshikeji. All rights reserved.
//

#import <Foundation/Foundation.h>


typedef NS_ENUM(NSInteger,BCLanguageType) {
    BCLanguageTypeEnglish = 1,//英语
    BCLanguageTypeChineseSimplified = 2,//简体中文
    BCLanguageTypeChineseTraditional = 3,//繁体中文
    BCLanguageTypeJapanese = 4,//日语
};

@interface BCLabguageSettingManager : NSObject

/**
 语言设置单例 项目中使用该对象
 */
+ (instancetype)shared;

/**
 *appLanguage
 */
@property (nonatomic, assign) BCLanguageType appLanguage;


/**
 *requestLang 请求时需要的参数
 */
@property (nonatomic, copy, readonly) NSString *requestLang;


/**
 *当前语言 用于显示当前设置的语言
 */
@property (nonatomic, copy, readonly) NSString *currentLanguageString;

/**
 根据语言获取当前对应string 区分多语言
 */
- (NSString *)languageStringFromType:(BCLanguageType)type;




+ (NSString *)localizedStringForKey:(NSString *)key value:(id)value table:(NSString *)table;
+ (NSString *)localizedStringFromLanguageTableForKey:(NSString *)key;


/**
 登录模块多语言语言
 */
+ (NSString *)localizedStringFromLoginLocalizationTableForKey:(NSString *)key;

@end

#define BCLocalizedKey(key) [BCLabguageSettingManager localizedStringFromLanguageTableForKey:(key)]
#define BCLocalizedFormatString(fmtKey, ...) [NSString stringWithFormat:BCLocalizedKey(fmtKey), __VA_ARGS__]

//登录
#define BCLoginLocalizedKey(key) [BCLabguageSettingManager localizedStringFromLoginLocalizationTableForKey:(key)]
#define BCLoginLocalizedFormatString(fmtKey, ...) [NSString stringWithFormat:BCLoginLocalizedKey(fmtKey), __VA_ARGS__]
